#ifndef SPRITE_H
#define SPRITE_H

#include "OpenGLRenderer.h"
#include "RGBAColor.h"
#include "Maths.h"
#include "String.h"

/*struct Sprite
{
    //GLuint iTexture;
    long iMaskData[][];
    long iWidth;
    long iHeight;
    
};*/

class CSprite
{
    
public:
    
    //CSprite() : m_iMaskData(0), m_iWidth(0), m_iHeight(0)       {}
    CSprite(String sTextureName, RGBAColor rgbaColor = RGBAColor(1, 1, 1, 1)) : m_iTexture(0), m_rgbaColor(rgbaColor)
    {
        load(sTextureName);
    }
    
    void load(String sTextureName);
    void setColor(RGBAColor rgbaColor)      { m_rgbaColor = rgbaColor; }
    
    void render();
    
    long getWidth()             { return m_iWidth; }
    long getHeight()            { return m_iHeight; }
    
private:
    
    GLuint m_iTexture;
    RGBAColor m_rgbaColor;
    long m_iWidth;
    long m_iHeight;
    Vector m_vCOMOffset;              //The center of mass offset of the sprite
    
};

#endif //SPRITE_H
